package chapter7;

import java.util.Scanner;

/**
 * 使用Scanner读取用户的键盘输入
 */
public class ScannerKeyBoardTest {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String next = sc.next();
            if(next.equals("quit")) {
                System.exit(0);
            }
            System.out.println("键盘输入的内容是:" + next);
        }
    }
}
